import React from 'react';
import { Tag } from 'antd';
import { useTranslation } from 'react-i18next';

import styles from './styles.module.less';

const Summary = ({ companyInfo }) => {
  const { t } = useTranslation();

  return (
    <div className={styles.summany_box}>
      <p className={styles.desc}>{companyInfo?.company?.description}</p>
      <div className={styles.more_information}>
        <ul className={styles.basics}>
          <li>
            <span className={styles.label}>{t('Year of Establishment')}：</span>
            <span className={styles.result}>{companyInfo?.company?.founding_year}年</span>
          </li>
          <li>
            <span className={styles.label}>{t('Legal Name')}：</span>
            <span className={styles.result}>{companyInfo?.company?.company_name}</span>
          </li>
          <li>
            <span className={styles.label}>{t('Company Type')}：</span>
            <span className={styles.result}>{companyInfo?.company?.company_type}</span>
          </li>
        </ul>
        <div className={styles.data_box}>
          <div>
            <span>{t('Data center operations')}：</span>
            <span>255</span>
          </div>
          <div>
            <span>{t('Access Point')}：</span>
            <span>201</span>
          </div>
          <div>
            <span>{t('Network structure')}：</span>
            <span>20</span>
          </div>
          <div>
            <span>{t('Company size')}：</span>
            <span>{'< 10000'}</span>
          </div>
        </div>
      </div>

      <div className={styles.server_box}>
        <div className={styles.name}>
          {t('Serve')}
        </div>
        <div className={styles.list}>
          {
            companyInfo?.company?.company_business?.map(item => (
              <Tag color='#329dff' key={item.business_id}>{t(item.business_name)}</Tag>
            ))
          }
        </div>
      </div>
      {/* <div className={styles.children_company}>
        <div className={styles.name}>
          子公司
        </div>
        <img src='https://directory-service-090921371925-us-west-2-prod.s3-us-west-2.amazonaws.com/CompanyLogo/200_10227-1602636063.png' alt='' />
      </div>
      <div className={styles.website}>
        <span className={styles.label}>网站：</span>
        <span>http://www.equinix.com</span>
      </div> */}
    </div>
  )
};

export default Summary;